set (CEGUI_TARGET_NAME ${CEGUI_COMMON_DIALOGS_LIBNAME})

file (GLOB MODULE_SOURCE_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" *.cpp)
file (GLOB COLOUR_PICKER_SOURCE_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" ColourPicker/*.cpp)
set (CORE_SOURCE_FILES ${MODULE_SOURCE_FILES} ${COLOUR_PICKER_SOURCE_FILES})

file (GLOB MODULE_HEADER_FILES ../../include/CEGUI/CommonDialogs/*.h)
file (GLOB COLOUR_PICKER_HEADER_FILES ../../include/CEGUI/CommonDialogs/ColourPicker/*.h)
set (CORE_HEADER_FILES ${MODULE_HEADER_FILES} ${COLOUR_PICKER_HEADER_FILES})

# we do not use the common header install function since we need to install to
# multiple sub-dirs.
cegui_add_library_impl(${CEGUI_TARGET_NAME} FALSE CORE_SOURCE_FILES CORE_HEADER_FILES TRUE FALSE)
cegui_target_link_libraries(${CEGUI_TARGET_NAME} ${CEGUI_BASE_LIBNAME})

install(FILES ${MODULE_HEADER_FILES} DESTINATION ${CEGUI_INCLUDE_INSTALL_DIR}/CEGUI/CommonDialogs COMPONENT cegui_devel)
install(FILES ${COLOUR_PICKER_HEADER_FILES} DESTINATION ${CEGUI_INCLUDE_INSTALL_DIR}/CEGUI/CommonDialogs/ColourPicker COMPONENT cegui_devel)

